﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace StandaloneSilverlightWoZ
{
    public class CollectedDataItem
    {
        /// <summary>
        /// The page number of the page to which this data item pertains.
        /// </summary>
        private int _pageNumber;
        private TimeSpan _pageDuration;
        /// <summary>
        /// The collection of mouse points collected when the mouse moves.
        /// </summary>
        private List<Point> _mousePointList;
        private string _comments;
        private int _buttonNumberClicked;

        /// <summary>
        /// The page number of the page to which this data item pertains.
        /// </summary>
        public int PageNumber
        {
            get
            {
                return _pageNumber;
            }
        }
        /// <summary>
        /// Amount of time spent on the page (separate value each time the page is loaded).
        /// </summary>
        public TimeSpan PageDuration
        {
            get
            {
                return _pageDuration;
            }
        }
        /// <summary>
        /// The collection of mouse points collected when the mouse moves.
        /// </summary>
        public List<Point> MousePointList
        {
            get
            {
                return _mousePointList;
            }
        }
        /// <summary>
        /// Comments entered by the user in the comments box.
        /// </summary>
        public String Comments
        {
            get
            {
                return _comments;
            }
        }
        /// <summary>
        /// The number of the button that was clicked, causing the transition.
        /// </summary>
        public int ButtonNumberClicked
        {
            get
            {
                return _buttonNumberClicked;
            }
        }
        
        /// <summary>
        /// Constructor for data item.
        /// </summary>
        /// <param name="pageNumber">The page number of the page to which this data pertains.</param>
        /// <param name="pageDuration">Amount of time spent on the page (separate value each time the page is loaded).</param>
        /// <param name="mousePointList">List of points collected from mouse movement for drawing trails.</param>
        /// <param name="comments">Comments entered by the user in the comments box.</param>
        /// <param name="buttonNumberClicked">The number of the button that was clicked, causing the transition.</param>
        public CollectedDataItem(int pageNumber, TimeSpan pageDuration, Point[] mousePointList, String comments, int buttonNumberClicked)
        {
            _pageNumber = pageNumber;
            _pageDuration = new TimeSpan(pageDuration.Ticks);
            _mousePointList = new List<Point>(mousePointList);
            _comments = comments;
            _buttonNumberClicked = buttonNumberClicked;
        }
    }
}
